package com.ruoyi.admin.controller;

import com.ruoyi.app.domain.PromotionInfo;
import com.ruoyi.app.service.UserService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/*
@description:用户推广记录
@ClassName PromotionController
@author chen
@create 2025-03-18 22:42
@Version 1.0
*/
@Slf4j
@RestController
@RequestMapping("promotion")
@AllArgsConstructor
public class PromotionController extends BaseController
{
    final UserService userService;

    /*
     * @==============History===============<br/>
     * @Description //   获取用户推广记录
     * @Date 2025-3-18 22:44
     * @Author < a href="15991488967@163.com">chen</ a>
     * @return com.ruoyi.framework.web.page.TableDataInfo
     */
    @GetMapping(value = "/getPromotionList",produces = "application/json;charset=utf-8")
    public TableDataInfo getPromotionList(@RequestParam Map<String, Object> params)
    {
        startPage();
        List<PromotionInfo> list = userService.getPromotionList(params);
        return getDataTable(list);
    }
}
